package com.galaxy.service.entity.system;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import java.util.Date;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import javax.persistence.Entity;
import javax.persistence.Table;
import lombok.NoArgsConstructor;

/**
 * @author caijinbang
 * @date 2018/9/12 12:47
 */

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "permission")
public class Permission {

  /**
   * 权限id
   */
  @TableId
  private String id;

  /**
   * 权限名称
   */
  private String name;

  /**
   * 父id
   */
  private String parentId;

  /**
   * 权限类型
   */
  private Short type;

  /**
   * 权限路径
   */
  private String url;

  /**
   * 权限内容
   */
  private String permission;

  /**
   * 颜色
   */
  private String color;

  /**
   * 图标
   */
  private String icon;

  /**
   * 排序
   */
  private Long sort;


  private Boolean verification;

  /**
   * 创建时间
   */
  private Date createDate;

  /**
   * 子权限
   */
  @TableField(exist = false)
  private List<Permission> children;

}
